package com.lyl.servicelive.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lyl.servicelive.entity.CourseConfig;
import com.lyl.servicelive.entity.CourseGoods;
import com.lyl.servicelive.mapper.CourseGoodsMapper;
import com.lyl.servicelive.service.CourseGoodsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 直播课程关联推荐表 服务实现类
 * </p>
 *
 * @author 雷艳玲
 * @since 2022-07-05
 */
@Service
public class CourseGoodsServiceImpl extends ServiceImpl<CourseGoodsMapper, CourseGoods> implements CourseGoodsService {

    @Override
    public List<CourseGoods> findByLiveCourseId(Long id) {
        QueryWrapper<CourseGoods> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("live_course_id", id);
        return baseMapper.selectList(queryWrapper);
    }
}
